using DeZhen.CollaborationPlatform.Model.Common;

namespace DeZhen.CollaborationPlatform.Model.DTO.ApiCallLog
{
    /// <summary>
    /// 接口调用日志查询参数DTO
    /// </summary>
    public class QueryApiCallLog 
    {
        /// <summary>
        /// 关联的接口ID,关联api_management表id字段
        /// </summary>
        public long? ApiId { get; set; }

        /// <summary>
        /// 接口URL
        /// </summary>
        public string? ApiUrl { get; set; }

        /// <summary>
        /// 请求方法(GET/POST/PUT/DELETE等)
        /// </summary>
        public string? ApiMethod { get; set; }

        /// <summary>
        /// 请求唯一标识
        /// </summary>
        public string? RequestId { get; set; }

        /// <summary>
        /// 客户端IP
        /// </summary>
        public string? ClientIp { get; set; }

        /// <summary>
        /// 用户ID(未登录为null)
        /// </summary>
        public string? UserId { get; set; }

        /// <summary>
        /// 响应状态码
        /// </summary>
        public int? ResponseCode { get; set; }

        /// <summary>
        /// 状态：1-成功，0-失败
        /// </summary>
        public bool? Status { get; set; }

        /// <summary>
        /// 请求时间范围
        /// </summary>
        public DateTime? RequestTimeStart { get; set; }

        /// <summary>
        /// 请求时间范围结束
        /// </summary>
        public DateTime? RequestTimeEnd { get; set; }
    }

    /// <summary>
    /// 接口调用日志分页查询参数DTO
    /// </summary>
    public class QueryApiCallLogPage : QueryPage
    {
        /// <summary>
        /// 关联的接口ID,关联api_management表id字段
        /// </summary>
        public long? ApiId { get; set; }

        /// <summary>
        /// 接口URL
        /// </summary>
        public string? ApiUrl { get; set; }

        /// <summary>
        /// 请求方法(GET/POST/PUT/DELETE等)
        /// </summary>
        public string? ApiMethod { get; set; }

        /// <summary>
        /// 请求唯一标识
        /// </summary>
        public string? RequestId { get; set; }

        /// <summary>
        /// 客户端IP
        /// </summary>
        public string? ClientIp { get; set; }

        /// <summary>
        /// 用户ID(未登录为null)
        /// </summary>
        public string? UserId { get; set; }

        /// <summary>
        /// 响应状态码
        /// </summary>
        public int? ResponseCode { get; set; }

        /// <summary>
        /// 状态：1-成功，0-失败
        /// </summary>
        public bool? Status { get; set; }

        /// <summary>
        /// 请求时间范围
        /// </summary>
        public DateTime? RequestTimeStart { get; set; }

        /// <summary>
        /// 请求时间范围结束
        /// </summary>
        public DateTime? RequestTimeEnd { get; set; }
    }
}